﻿using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace Legend.Component.Interface
{
    public abstract class IRenderable : IComponent
    {
        private Legend.Object.GameObject owner;
        private Matrix viewMatrix;
        private Matrix projectionMatrix;
        private Matrix worldMatrix;
        private Vector3 ambientColor = new Vector3(1, 1, 1);

        public abstract void Render(GraphicsDevice device);
        public Legend.Object.GameObject Owner
        {
            get { return owner; }
            set { owner = value; }
        }
        public Matrix ViewMatrix
        {
            get { return viewMatrix; }
            set { viewMatrix = value; }
        }
        public Matrix ProjectionMatrix
        {
            get { return projectionMatrix; }
            set { projectionMatrix = value; }
        }
        public Matrix WorldMatrix
        {
            get { return worldMatrix; }
            set { worldMatrix = value; }
        }

        public Vector3 AmbientColor
        {
            get { return ambientColor; }
            set { ambientColor = value; }
        }

        public System.Type UniqueType
        {
            get { return typeof(IRenderable); }
        }
    }
}
